package com.xishu.dao.jpa;

import com.xishu.entity.foodpanda.Product;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface ProductDao extends JpaRepository<Product, Long>, JpaSpecificationExecutor<Product> {
    @Query(value = "select  max(showOrder)  from product m " +
            "where  m.categoryId = :categoryId ")
    public Integer maxShowOrder(Long categoryId);
}
